create  table jms_dm.dm_end_sender_report_sum_dt 
(
date_time timestamp COMMENT '' ,
 pick_regional_code    varchar(100) COMMENT '取件_大区code' ,
 pick_regional_name    varchar(100) COMMENT '取件_大区name' ,
 pick_agent_code       varchar(100) COMMENT '取件_代理区编码' ,
 pick_agent_name       varchar(100) COMMENT '取件_代理区名称' ,
 pick_fran_code        varchar(100) COMMENT '取件_加盟商' ,
 pick_fran_name        varchar(100) COMMENT '取件_加盟商' ,
 pick_network_code     varchar(100) COMMENT '取件网点code' ,
 pick_network_name     varchar(100) COMMENT '取件网点名称' ,
business_name         varchar(100) COMMENT '品牌' ,
post_site_code        varchar(100) COMMENT '门店编码' ,
post_site_name        varchar(100) COMMENT '门店name' ,
post_site_address     varchar(100) COMMENT '门店地址' ,
customer_code         varchar(100) COMMENT '客户编号code' ,
customer_name         varchar(100) COMMENT '客户编号名称' ,
order_source_code              varchar(100) COMMENT '订单来源code' ,
order_source_name              varchar(100) COMMENT '订单来源名称' ,
 varchar(100) COMMENT '' ,
post_site_num         bigint COMMENT '寄件门店数量' ,
customer_num          bigint COMMENT '寄件客户数量' ,
 varchar(100) COMMENT '' ,
bill_num              bigint COMMENT '订单量' ,
today_pick_num        bigint COMMENT '当日揽收量' ,
nextday_pick_num      bigint COMMENT '次日揽收量' ,
total_pick_num        bigint COMMENT '总揽收量' ,
cancel_num            bigint COMMENT '取消量' ,
pick_time_end_num     bigint COMMENT '超时未取件' ,
type                  varchar(100) COMMENT '1网点,2门店,3订单维度' ,
 category_id varchar(100) COMMENT '' ,
 dt varchar(100) COMMENT '' )
ENGINE=OLAP
DUPLICATE KEY(填写key)
comment 'insert overwrite table jms_dm.dm_end_sender_report_sum_dt partition(dt)'
PARTITION BY RANGE (date_time) ( 
   START ("2023-11-04") END ("2024-01-03") EVERY (INTERVAL 1 day))
DISTRIBUTED BY HASH(site_code) BUCKETS 4
PROPERTIES (
"replication_num" = "3",
"dynamic_partition.enable" = "true",
"dynamic_partition.time_unit" = "DAY",
"dynamic_partition.time_zone" = "Asia/Shanghai",
"dynamic_partition.start" = "-365",
"dynamic_partition.end" = "3",
"dynamic_partition.prefix" = "p",
"dynamic_partition.buckets" = "4",
"in_memory" = "false",
"storage_format" = "V2"
);